//
//  MineTeamTableViewCell.m
//  ShouYi
//
//  Created by yrapp on 16/2/22.
//  Copyright © 2016年 yurui. All rights reserved.
//

#import "MineTeamTableViewCell.h"

@implementation MineTeamTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
 
        self.contentView.backgroundColor = [UIColor colorWithRed:235.0/255 green:235.0/255 blue:235.0/255 alpha:1];
        UIView *background = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kWidth, 55)];
        background.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:background];
        
        self.headerImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, 40, 40)];
        [self.headerImage setImage:[UIImage imageNamed:@"img_xxxx.jpg"]];
        [self.contentView addSubview:self.headerImage];
        
        self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(_headerImage.frame.origin.x + _headerImage.frame.size.width + 10, 10, 30, 20)];
        self.nameLabel.text = @"张三";
        self.nameLabel.font = [UIFont systemFontOfSize:13];
        [self.contentView addSubview:self.nameLabel];
        
        self.phoneLabel = [[UILabel alloc] initWithFrame:CGRectMake(_nameLabel.frame.origin.x + _nameLabel.frame.size.width + 10, 10, 100, 20)];
        self.phoneLabel.text = @"18055394263";
        self.phoneLabel.font = [UIFont systemFontOfSize:13];
        [self.contentView addSubview:self.phoneLabel];
        
        self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(_nameLabel.frame.origin.x, _nameLabel.frame.origin.y + 20, 100, 20)];
        self.timeLabel.text = @"2016-01-01 16:30:42";
        [self.timeLabel sizeToFit];
        self.timeLabel.textColor = [UIColor grayColor];
        self.timeLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:self.timeLabel];
        
        
        
        self.priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(kWidth - 100,10, 90, 20)];
        self.priceLabel.text = @"+0.00";
        self.priceLabel.textAlignment = NSTextAlignmentRight;
        //self.priceLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.priceLabel];
        
        UILabel *chengYuanLabel = [[UILabel alloc] initWithFrame:CGRectMake(kWidth - 45, _timeLabel.frame.origin.y, 50, 20)];
        chengYuanLabel.text = @"个成员";
        [chengYuanLabel sizeToFit];
        chengYuanLabel.textColor = [UIColor grayColor];
        chengYuanLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:chengYuanLabel];
        
        self.memberLabel = [[UILabel alloc] initWithFrame:CGRectMake(kWidth - 45 - 100, _timeLabel.frame.origin.y,100, 20)];
        self.memberLabel.textColor = [UIColor redColor];
        self.memberLabel.font = [UIFont systemFontOfSize:14];
        self.memberLabel.text = @"0";
        self.memberLabel.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:self.memberLabel];
        
        
        
    }
    
    return self;
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
